﻿#ifndef XYCONTROLWIDGET_H
#define XYCONTROLWIDGET_H

#include <QWidget>
#include <QtWidgets/QGridLayout>
#include <QtWidgets/QPushButton>

class XYControlWidget : public QWidget
{
    Q_OBJECT

public:
    explicit XYControlWidget(QWidget *parent = 0);
    ~XYControlWidget();
signals:
    void moveForward();
    void moveBackward();
    void moveLeft();
    void moveRight();

    void moveForwardLeft();
    void moveForwardRight();
    void moveBackwardLeft();
    void moveBackwardRight();

    void moveForwardStop();
    void moveBackwardStop();
    void moveLeftStop();
    void moveRightStop();

    void stop();
private:
    void initContent();
    void initConnection();
    QGridLayout *gridLayout;
    QPushButton *pushButtonMotorBackward;
    QPushButton *pushButtonMotorLeft;
    QPushButton *pushButtonStop;
    QPushButton *pushButtonMotorRight;
    QPushButton *pushButtonMotorForward;
    QPushButton *pushButtonMotorUpRight;
    QPushButton *pushButtonMotorUpLeft;
    QPushButton *pushButtonMotorDownRight;
    QPushButton *pushButtonMotorDownLeft;
};

#endif // XYCONTROLWIDGET_H
